﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CivitaiCLI.Utils
{
    public class CivitaiCLISettings : Settings
    {
        const string NONE = "none";
        const string DEFAULT = "default";

        static bool IsNullEmptyOrDefault(string str)
        {
            return !string.IsNullOrEmpty(str) && str.Equals(NONE, StringComparison.InvariantCultureIgnoreCase) || str.Equals(DEFAULT, StringComparison.InvariantCultureIgnoreCase);
        }

        public bool HasAuthToken { get => !IsNullEmptyOrDefault(AuthToken); }
        public string AuthToken { get; set; } = NONE;
        public bool HasPath { get => !IsNullEmptyOrDefault(Path); }
        public string Path { get; set; } = DEFAULT;
        public bool HasUserAgent { get => !IsNullEmptyOrDefault(UserAgent); }
        public string UserAgent { get; set; } = DEFAULT;
        public bool DownloadOnlyMetadata { get; set; } = false;
        public bool MonitorAlwaysUpdate { get; set; } = true;
        public ClipboardMode ClipboardMode { get; set; } = ClipboardMode.Download;
        public OperatingMode Mode { get; set; } = OperatingMode.Interactive;
    }
}
